Fix concurrent iteration and deletion issues in SplObjectStorage#21443
Fix concurrent iteration and deletion issues in SplObjectStorage#21443ndossche wants to merge 2 commits intophp:PHP-8.4from
Conversation
Girgias
left a comment
There was a problem hiding this comment.
Seems reasonable. Might have some performance impact but better correct and slow than fast and broken.
It's possible to avoid making it slower by changing how the attach function works: if the caller is expected to make a copy then the overhead is reduced a lot because addAll and removeExcept won't make excessive copies. |
Right, but that would be master level change anyway. |
Reported by @cnitlrt